package com.etc.entity;

import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * (Concern)实体类
 *
 * @author makejava
 * @since 2021-10-18 22:32:00
 */
@Component
public class Concern  {
    private static final long serialVersionUID = 746684234357421516L;
    /**
     * 关注
     */
    private String concernId;
    /**
     * 用户
     */
    private User userId;
    /**
     * 关注时间
     */
    private String concernDate;
    /**
     * 直播间
     */
    private Room roomId;


    public String getConcernId() {
        return concernId;
    }

    public void setConcernId(String concernId) {
        this.concernId = concernId;
    }

    public User getUserId() {
        return userId;
    }

    public void setUserId(User userId) {
        this.userId = userId;
    }

    public String getConcernDate() {
        return concernDate;
    }

    public void setConcernDate(String concernDate) {
        this.concernDate = concernDate;
    }

    public Room getRoomId() {
        return roomId;
    }

    public void setRoomId(Room roomId) {
        this.roomId = roomId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Concern concern = (Concern) o;
        return Objects.equals(concernId, concern.concernId) &&
                Objects.equals(userId, concern.userId) &&
                Objects.equals(concernDate, concern.concernDate) &&
                Objects.equals(roomId, concern.roomId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(concernId, userId, concernDate, roomId);
    }

    @Override
    public String toString() {
        return "Concern{" +
                "concernId='" + concernId + '\'' +
                ", userId=" + userId +
                ", concernDate='" + concernDate + '\'' +
                ", roomId=" + roomId +
                '}';
    }

    public Concern() {
    }

    public Concern(String concernId, User userId, String concernDate, Room roomId) {
        this.concernId = concernId;
        this.userId = userId;
        this.concernDate = concernDate;
        this.roomId = roomId;
    }
}

